const intervalId = setInterval(function () {
    rei_log('获取机器人信息中')
    if (typeof robotData['robot_ID'] != 'undefined'){
        try{
            rei_robot = new rei_robot_core({robotName:robotData['robot_ID']})
        }catch(error){
            console.log('未能识别到设备')
        }
        //增加新的设备
        // rei_robot.addRoboCard({
        //     CardID:'bobac3-tag-button',
        //     ImgSource:'static/img/bobac3.png',
        //     CardName:'Bobac',
        //     CardTool:'bobac-tool'
        // })
        rei_log('识别到设备:'+robotData['robot_ID'])
        clearInterval(intervalId)

        var selectElement = document.getElementById('maplist')
        mapList.forEach(map=>{
            var newoption = new Option(map,map)
            selectElement.appendChild(newoption)
        })
        updata_Goallist()
        // 加载界面
        $(".loader-wrapper").fadeOut("slow")
    }else{
        rei_log('未查询到机器人信息')
        inter++
        rei_log('一秒后进行第'+inter+'次尝试')
    }

}, 1000); // 每隔2秒执行一次

